/*
 * @Author: 李兵 964368540@qq.com
 * @Date: 2024-05-25 16:26:08
 * @LastEditors: libing 9852442+liu-sheng-8667@user.noreply.gitee.com
 * @LastEditTime: 2024-12-25 23:11:34
 * @FilePath: \crm\contacts\calendar.js
 * @Description:
 */
import { getMapToArray, getKeyToValueMap } from "@/utils/utils";

// 通知类型  通知：1提前15分钟 2 提前半小时 3 提前1小时 4提前2小时 5 提前半天 6 提前1天
const NOTICE_TYPE = {
  ONE: {
    value: 1,
    label: "提前15分钟",
  },
  TWO: {
    value: 2,
    label: "提前半小时",
  },
  THREE: {
    value: 3,
    label: "提前1小时",
  },
  FOUR: {
    value: 4,
    label: "提前2小时",
  },
  FIVE: {
    value: 5,
    label: "提前半天",
  },
  SIX: {
    value: 6,
    label: "提前1天",
  },
};

export const NOTICE_TYPE_ARRAY = getMapToArray(NOTICE_TYPE);
export const NOTICE_TYPE_MAP = getKeyToValueMap(NOTICE_TYPE, "value", "label");

// 日程类型:1客户跟进 2 回款计划
const DAY_TASK = {
  TYPE_1: {
    value: 1,
    label: "客户跟进",
  },
  TYPE_2: {
    value: 2,
    label: "回款计划",
  },
};

export const DAY_TASK_ARRAY = getMapToArray(DAY_TASK);
export const DAY_TASK_MAP = getKeyToValueMap(DAY_TASK, "value", "label");

export const CUSTOMER_SOURCE = Object.freeze({
  ONE: { label: "网络", value: "1" },
  TWO: { label: "扫街", value: "2" },
  THREE: { label: "客户介绍", value: "3" },
  FOUR: { label: "竞争对手", value: "4" },
  FIVE: { label: "其他", value: "5" },
  SIX: { label: "系统提供", value: "6" },
  SEVEN: { label: "自己注册", value: "7" },
});

export const CUSTOMER_SOURCE_ARRAY = getMapToArray(CUSTOMER_SOURCE);
export const CUSTOMER_SOURCE_MAP = getKeyToValueMap(
  CUSTOMER_SOURCE,
  "value",
  "label"
);

export const CUSTOMER_STATUS = Object.freeze({
  ONE: { label: "正常", value: "0" },
  TWO: { label: "禁用", value: "-1" },
});

export const CUSTOMER_STATUS_ARRAY = getMapToArray(CUSTOMER_STATUS);
export const CUSTOMER_STATUS_MAP = getKeyToValueMap(
  CUSTOMER_STATUS,
  "value",
  "label"
);

// 跟进方式
export const FOLLOW_TYPE = Object.freeze({
  OME: { label: "上门", value: "1" },
  TWO: { label: "微信", value: "2" },
  THREE: { label: "电话", value: "3" },
});

export const FOLLOW_TYPE_ARRAY = getMapToArray(FOLLOW_TYPE);
export const FOLLOW_TYPE_MAP = getKeyToValueMap(FOLLOW_TYPE, "value", "label");

// 性别
export const SEX_TYPE = Object.freeze({
  OME: { label: "男", value: "0" },
  TWO: { label: "女", value: "1" },
});

export const SEX_TYPE_ARRAY = getMapToArray(SEX_TYPE);
export const SEX_TYPE_MAP = getKeyToValueMap(SEX_TYPE, "value", "label");
